package com.lg.patter.behavior.observed;

/**
 * @author by Mr. Li 2020/5/8 19:25
 */
public class Main {
    public static void main(String[] args) {
        Course course = new Course("观察者模式");
        Teacher teacher = new Teacher("qqq");

        course.addObserver(teacher);

        Question question = new Question();
        question.setUserNAME("xiaogang");
        question.setQuestionContent("heheheh");

        course.produceQuestion(course, question);

    }
}
